package cn.tedu.egweibo6.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserRegDTO {
    @ApiModelProperty(value = "昵称", required = true, dataType = "string")
    private String nickname;
    @ApiModelProperty(value = "密码", required = true, dataType = "string")
    @NotBlank(message = "密码不能为空白")
    @Pattern(regexp = "\\w+" , message = "密码只能为数字/英文字母/下划线组成")
    private String password;
    @ApiModelProperty(value = "用户名", required = true, dataType = "string")
    @Pattern(regexp = "\\w+" , message = "用户名只能为数字/英文字母/下划线组成")
    @Size(min = 2, max = 10, message = "用户名长度为2-10")
    private String username;
}
